﻿@model DealKhuyenMaiV2.com.Models.Account
@{
    ViewBag.Title = "Trang cá nhân của bạn";
    Layout = "~/Views/Shared/_MemberGuestLayout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("/Content/DefaultThemes/Styles/login.css")" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
   
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=AIzaSyBJYUiP0GUFitcMboSth7nDK61S8IiZyz0"
        type="text/javascript"></script>
    <script src="../../Scripts/gMap.js" type="text/javascript"></script>
       <script type="text/javascript">
           $(document).ready(function () {

               $("#abc").hide(0);
               
           });
    </script>
</head>
<body>
    <div class="body-left">
        <!--Unknown-->
        <!-- UPD 27.10.3 -->
        <div class="middle-box-white">
            <div class="middle-box-title">
                <div class="left">
                    <h3>
                        <span class="middle-size">Trang thông tin của</span> <a href="@Url.Action("UserDetail", "Account")">
                            <span style="color: red">@Model.Email</span></a>
                    </h3>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="middle-box-content">
                <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
                <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
                @using (Html.BeginForm())
                {
                    
                    @Html.ValidationSummary();
                    <div>
                        <fieldset>
                            <div id="abc">
                                @Html.TextBoxFor(m => m.Email, new { @Value = "abc@gmail.com" })
                                @Html.TextBoxFor(m => m.Password, new { @Value = "abc@gmail.com" })
                            </div>
                            <table class="table-user-detail">
                                <tbody>
                                    <tr style="height: 10px;">
                                        <td>
                                            <label>Tài khoản:</label>                                        
                                        </td>
                                        <td>
                                            <p>@Model.Email</p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label>Loại tài khoản:&nbsp&nbsp&nbsp&nbsp&nbsp</label>                                        
                                        </td>
                                        <td>
                                            @if (User.IsInRole("member"))
                                            {
                                                <p>Thành viên thường</p>
                                            }
                                            @if (User.IsInRole("company"))
                                            {
                                                <p>Thành viên doanh nghiệp</p>
                                            }
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label>Địa chỉ:</label>                                        
                                        </td>
                                        <td>
                                            <p>
                                                <div class="div_txtDK">
                                                    @Html.TextBoxFor(m => m.AddressReceive)
                                                    @Html.ValidationMessageFor(m => m.AddressReceive)
                                                </div>
                                            </p>
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                            <label>Sổ điện thoại:</label>                                        
                                        </td>
                                        <td>
                                            <p>
                                                <div class="div_txtDK">
                                                    @Html.TextBoxFor(m => m.PhoneNumber)
                                                    @Html.ValidationMessageFor(m => m.PhoneNumber)
                                                </div>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label></label>                                        
                                        </td>
                                        <td>
                                            <p>
                                                @Html.ActionLink("Đổi mật khẩu", "ChangePassword")       
                                            </p>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>

                            @if (User.IsInRole("company"))
                            {
                                <script>
                                    $(document).ready(function () {
                                        initializeGmarkerForEdit("map_canvas", "#Latitude", "#Longitude", "#AddressReceive",@Model.Latitude,@Model.Longitude,'@Model.AddressReceive');
                                        
                                    });
                                </script>
                                <p style="font-size: 20px">
                                    Thông tin dành cho thành viên công ty
                                </p>
                                <table class="table-user-detail">
                                    <tbody>
                                        <tr>
                                            <td>
                                                @Html.LabelFor(m => m.FullName)
                                            </td>
                                            <td>
                                                <p>
                                                    <div class="div_txtDK" id="kocan">
                                                        @Html.TextBoxFor(m => m.FullName)
                                                        @Html.ValidationMessageFor(m => m.FullName)
                                                    </div>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @Html.LabelFor(m => m.Description)
                                            </td>
                                            <td>
                                                <p>
                                                    <div class="div_txtDK" id="kocan1">
                                                        @Html.TextBoxFor(m => m.Description)
                                                        @Html.ValidationMessageFor(m => m.Description)
                                                    </div>
                                                </p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div style="border: 1px; border-color: cornflowerblue; border-style: solid;">
                                    <input id="Map2Addr" type="checkbox" />Chuyển map sang địa chỉ
                                    <input id="Addr2Map" type="checkbox" />Chuyển địa chỉ sang map
                                    <input type="button" value="Select Center" title="Chọn trung tâm là địa điểm của bạn!"
                                           id="SelectCenter" />
                                    <input type="button" value="Your Location" title="Chọn địa địa hiện tại bạn đang ở!"
                                           id="YourLocation" />
                                    <br />
                                    <br />
                                    <div id="map_canvas" style="width: 100%; height: 400px">
                                    </div>
                                </div>
                                <table class="table-user-detail">
                                    <tbody>

                                        <tr>
                                            <td>
                                                @Html.LabelFor(m => m.Latitude)
                                            </td>
                                            <td>
                                                <p>
                                                    <div class="div_txtDK" id="kocan3">
                                                        @Html.TextBoxFor(m => m.Latitude)
                                                        @Html.ValidationMessageFor(m => m.Latitude)
                                                    </div>
                                                </p>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @Html.LabelFor(m => m.Longitude)
                                            </td>
                                            <td>
                                                <p>
                                                    <div class="div_txtDK" id="kocan4">
                                                        @Html.TextBoxFor(m => m.Longitude)
                                                        @Html.ValidationMessageFor(m => m.Longitude)
                                                    </div>
                                                </p>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                
                            }
                            <p class="middle-box-button">
                                <input type="submit" value="Cập nhật" class="button_cam" />
                            </p>
                        </fieldset>
                    </div>  
                }
            </div>
        </div>
    </div>
</body>
</html>
